import request from '@/utils/request'
/*
  获取管理员列表
*/
export function getList(data: any) {
  return request({
    url: '/api/admin/list',
    method: 'post',
    data,
  })
}
/*
  获取所有管理员账号信息
*/
export function getManageAll() {
  return request({
    url: '/api/admin/all',
    method: 'post',
  })
}
/*
  新增管理员
*/
export function userCreate(data: any) {
  return request({
    url: '/api/admin/create',
    method: 'post',
    data,
  })
}
/*
  删除管理员
*/
export function doDelete(data: any) {
  return request({
    url: '/api/admin/delete',
    method: 'post',
    data,
  })
}
/*
  管理员重置密码
*/
export function setPwd(data: any) {
  return request({
    url: '/api/manage/reset/password',
    method: 'post',
    data,
  })
}
/*
  获取角色
*/
export function getRoleAll() {
  return request({
    url: '/api/role/all',
    method: 'post',
  })
}
/*
  管理员绑定角色授权
*/
export function bindRole(data: any) {
  return request({
    url: '/api/role/bind',
    method: 'post',
    data,
  })
}

export function doEdit(data: any) {
  return request({
    url: '/table/doEdit',
    method: 'post',
    data,
  })
}
export function disable(data: any) {
  return request({
    url: '/api/manage/disable',
    method: 'post',
    data,
  })
}
